package com.ahsjdy.stcommon.dto;


public class PageDTO {
    //每页显示的个数
    public static final int pre_page_number = 2;

    //总页数
    private int totalPage;

    //当前页
    private int currentPage;

    //每页展示的数据
    private Object data;

    public static PageDTO build(Object data, int totalPage, int currentPage) {
        PageDTO pageDTO = new PageDTO();
        pageDTO.setData(data);
        pageDTO.totalPage = totalPage;
        pageDTO.currentPage = currentPage;
        return pageDTO;
    }

    public Object getData() {
        return data;
    }

    public int getCurrentPage() {
        return currentPage;
    }

    public int getTotalPage() {
        return this.totalPage;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
